//package com.fitzone.web.listener;
//
//import com.fitzone.model.dto.OrdersVipDTO;
//import com.fitzone.web.service.OrdersService;
//import lombok.RequiredArgsConstructor;
//import org.springframework.amqp.core.ExchangeTypes;
//import org.springframework.amqp.rabbit.annotation.Exchange;
//import org.springframework.amqp.rabbit.annotation.Queue;
//import org.springframework.amqp.rabbit.annotation.QueueBinding;
//import org.springframework.amqp.rabbit.annotation.RabbitListener;
//import org.springframework.stereotype.Component;
//import org.springframework.web.bind.annotation.RequestBody;
//import org.springframework.web.bind.annotation.RequestParam;
//
//@Component
//@RequiredArgsConstructor
//public class PayListener {
//    private final OrdersService ordersService;
//
//    @RabbitListener(bindings = @QueueBinding(
//            value = @Queue(name = "order.pay.queue", durable = "true"),
//            exchange = @Exchange(name = "amq.topic", type = ExchangeTypes.TOPIC),
//            key = "pay.success"
//    ))
//    public void payListener(Long orderId) {
//        System.out.println("收到了一条信息。。。。。。。。");
//        ordersService.getById(orderId);
//    }
//}
